package com.aote.gradleproject.pojo;

import com.aote.gradleproject.util.Json;
import com.aote.gradleproject.util.Resource;

/**
 * @author 张琪
 * @date 2021/7/16 17:26
 */
public class AlipayParameter {

    /**
     * 项目绝对路径
     */
    private String absolutePath = Resource.getAbsolutePath();
    /**
     * 监听服务的ip, 一般为 127.0.0.1
     */
    private String serverHost;
    /**
     * 监听服务监听的端口
     */
    private int port;
    /**
     * 私钥相对路径
     */
    private String privateKey;
    /**
     * 私钥密码
     */
    private String privateKeyPassword;
    /**
     * 信认证书相对路径
     */
    private String trustKey;
    /**
     * 信认证书密码
     */
    private String trustKeyPassword;

    public String getAbsolutePath() {
        return absolutePath;
    }

    public void setServerHost(String serverHost) {
        this.serverHost = serverHost;
    }
    public String getServerHost() {
        return serverHost;
    }

    public void setPort(int port) {
        this.port = port;
    }
    public int getPort() {
        return port;
    }

    public void setPrivateKey(String privateKey) {
        this.privateKey = privateKey;
    }
    public String getPrivateKey() {
        return absolutePath + privateKey;
    }

    public void setPrivateKeyPassword(String privateKeyPassword) {
        this.privateKeyPassword = privateKeyPassword;
    }
    public String getPrivateKeyPassword() {
        return privateKeyPassword;
    }

    public void setTrustKey(String trustKey) {
        this.trustKey = trustKey;
    }
    public String getTrustKey() {
        return absolutePath + trustKey;
    }

    public void setTrustKeyPassword(String trustKeyPassword) {
        this.trustKeyPassword = trustKeyPassword;
    }
    public String getTrustKeyPassword() {
        return trustKeyPassword;
    }

    @Override
    public String toString() {
        return Json.object2Json(this).toString(4);
    }
}
